Tuple

data class Tuple<X, Y>(val left: X, val right: Y)

Simple pair data class for storing and interacting with arbitrary pairs of types.

Author

fzzyhmstrs

Since

0.6.0

Parameters

X

left element type

Y

right element type

left

X instance

right

Y instance

Constructors

Link copied to clipboard
constructor(left: X, right: Y)

Properties

Link copied to clipboard
val left: X
Link copied to clipboard
val right: Y

Functions

Link copied to clipboard

(Currently unused) which side of this tuple was the most recently updated

Link copied to clipboard
fun withLeft(newLeft: X): ValidatedPair.Tuple<X, Y>

Constructs a new Tuple with an updated left side only, using the existing right side

Link copied to clipboard
fun withRight(newRight: Y): ValidatedPair.Tuple<X, Y>

Constructs a new Tuple with an updated right side only, using the existing left side